package commRedisRpc

import (
	"encoding/json"
	commRedisRpc "gitee.com/fierce_wolf/go-fox-edge-common/commRedisList"
)

type redisListChannelServerReport struct {
	redisList commRedisRpc.RedisListService
}

func (e *redisListChannelServerReport) Push(value *ChannelRespondVO) error {
	mainKey := "fox-edge:list:channel:report"

	code, err := json.Marshal(value)
	if err != nil {
		return err
	}

	jsn := string(code)
	err = e.redisList.KPush(mainKey, jsn)
	if err != nil {
		return err
	}
	return nil
}
